using Microsoft.AspNetCore.Mvc;
using Model;
using OnceMi.AspNetCore.IdGenerator;
using Service.Base;

namespace WebApplication1.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class WeatherForecastController : ControllerBase
    {

        private readonly ILogger<WeatherForecastController> _logger;
        private readonly IBaseService<User, UserVo> _userService;
        private readonly IIdGeneratorService _idGenerator;

        public WeatherForecastController(ILogger<WeatherForecastController> logger,IBaseService<User,UserVo> userService , IIdGeneratorService idGenerator)
        {
            _logger = logger;
            _userService = userService;
            _idGenerator= idGenerator;
        }

        [HttpGet(Name = "GetWeatherForecast")]
        public async Task<List<UserVo>> Get()
        {
            var datelist = await _userService.Query();
            return datelist;
        }
    }
}
